import random

from rest_framework import throttling


class CustomThrottle(throttling.BaseThrottle):

    def allow_request(self, request, view):
        return random.randint(1, 10) != 1
